<table cellpadding="0" cellspacing="0" width="100%" align="left">
    <col width="50%">
    <col width="50%">
    <tr>
        <?php $i = 1; foreach ($aryCategoryInfo as $key => $value) {?>
        <td align="left" valign="top">
            <div class="list-category-info" id="list-cat-info-<?php echo $value['category_info_id'];?>">
                <?php if($perProductCategoryAdd == 1 || $isMaster == 1){?>
                    <span style="padding-left: 2px;"><img height="14" class="cpointer" src="/public/images/form/Button-Add-icon.png"  onclick="AdminController.showOverlayAddSubCatInfo('<?php echo $value['category_info_id'];?>', '<?php echo $value['category_info_name'];?>');"></span>
                 <?php } ?>
                 <?php if($perProductCategoryDelete == 3 || $isMaster == 1){?>
                    <span style="padding-left: 2px;"><img height="14" class="cpointer" src="/public/images/form/delete.png" onclick="AdminController.deleteCategoryById('<?php echo $value['category_info_id'];?>', 'cat_info');"></span>
                <?php } ?>
                <?php if($perProductCategoryEdit == 2 || $isMaster == 1){?>
                    <span><img height="14" class="cpointer" src="/public/images/form/icon-edit.gif" title="Chỉnh sửa danh mục này" onclick="AdminController.showEditCategoryInfo('<?php echo $value['category_info_id'];?>');"></span>
                <?php } ?>
                <a onclick="AdminController.pmicoViewSubCategory('<?php echo $value['category_id'];?>')" class="cpointer" style="padding-right: 10px;font-weight: bold;color: #0000FF;"><?php echo $value['category_info_name'];?></a>
            </div>
            <div class="hide" id="sub-input-cat-info-<?php echo $value['category_info_id'];?>">
                <span><input id="info-<?php echo $value['category_info_id'];?>" type="text" value="<?php echo $value['category_info_name'];?>"></span>
                <span><input onclick="AdminController.saveCategoryInfoById('<?php echo $value['category_info_id'];?>');" type="button" class="cpointer" value="Lưu" style="border: none;"></span>
                <span><input type="button" title="Đóng" class="save-cat" onclick="AdminController.closeEditCatInfoById('<?php echo $value['category_info_id'];?>');"></span>
            </div>
                <?php if(is_array($value['sub_category_info'])) {?>
                    <?php foreach ($value['sub_category_info'] as $key2 => $sub2) {?>
                    <div style="padding-left: 50px;">
                        <div class="list-category-info" id="list-cat-info-<?php echo $sub2['category_info_id'];?>">
                            <?php if($perProductCategoryAdd == 1 || $isMaster == 1){?>
                                <span style="padding-left: 2px;"><img height="14" class="cpointer" src="/public/images/form/Button-Add-icon.png"  onclick="AdminController.showOverlayAddSubCatInfoLevel3('<?php echo $sub2['category_info_id'];?>', '<?php echo $sub2['category_info_name'];?>');"></span>
                            <?php } ?>
                            <?php if($perProductCategoryDelete == 3 || $isMaster == 1){?>
                                <span style="padding-left: 2px;"><img height="14" class="cpointer" src="/public/images/form/delete.png" onclick="AdminController.deleteCategoryById('<?php echo $sub2['category_info_id'];?>', 'cat_info');"></span>
                            <?php } ?>
                            <?php if($perProductCategoryEdit == 2 || $isMaster == 1){?>
                                <span><img height="14" class="cpointer" src="/public/images/form/icon-edit.gif" title="Chỉnh sửa danh mục này" onclick="AdminController.showEditCategoryInfo('<?php echo $sub2['category_info_id'];?>');"></span>
                            <?php } ?>
                                <a  class="cpointer" style="padding-right: 10px;font-weight: bold;color: #0000FF;"><?php echo $sub2['category_info_name'];?></a>
                        </div>
                        <div class="hide" id="sub-input-cat-info-<?php echo $sub2['category_info_id'];?>">
                            <span><input id="info-<?php echo $sub2['category_info_id'];?>" type="text" value="<?php echo $sub2['category_info_name'];?>"></span>
                            <span><input onclick="AdminController.saveCategoryInfoById('<?php echo $sub2['category_info_id'];?>');" type="button" class="cpointer" value="Lưu" style="border: none;"></span>
                            <span><input type="button" title="Đóng" class="save-cat" onclick="AdminController.closeEditCatInfoById('<?php echo $sub2['category_info_id'];?>');"></span>
                        </div>
                    </div>
                        <?php if(is_array($sub2['cat_info_level3'])){?>
                            <?php foreach ($sub2['cat_info_level3'] as $key => $catLevel3) { ?>
                                <div style="padding-left: 110px;">
                                    <div class="list-category-info" id="list-cat-info-<?php echo $catLevel3['category_info_id'];?>">
                                        <?php if($perProductCategoryDelete == 3 || $isMaster == 1){?>
                                            <span style="padding-left: 2px;"><img height="14" class="cpointer" src="/public/images/form/delete.png" onclick="AdminController.deleteCategoryById('<?php echo $catLevel3['category_info_id'];?>', 'cat_info');"></span>
                                        <?php }?>
                                        <?php if($perProductCategoryEdit == 2 || $isMaster == 1){?>
                                            <span><img height="14" class="cpointer" src="/public/images/form/icon-edit.gif" title="Chỉnh sửa danh mục này" onclick="AdminController.showEditCategoryInfo('<?php echo $catLevel3['category_info_id'];?>');"></span>
                                        <?php } ?>
                                        <a class="cpointer" style="padding-right: 10px;font-weight: bold;color: #0000FF;"><?php echo $catLevel3['category_info_name'];?></a>
                                    </div>
                                    <div class="hide" id="sub-input-cat-info-<?php echo $catLevel3['category_info_id'];?>">
                                        <span><input id="info-<?php echo $catLevel3['category_info_id'];?>" type="text" value="<?php echo $catLevel3['category_info_name'];?>"></span>
                                        <span><input onclick="AdminController.saveCategoryInfoById('<?php echo $catLevel3['category_info_id'];?>');" type="button" class="cpointer" value="Lưu" style="border: none;"></span>
                                        <span><input type="button" title="Đóng" class="save-cat" onclick="AdminController.closeEditCatInfoById('<?php echo $catLevel3['category_info_id'];?>');"></span>
                                    </div>
                                </div>
                            <?php } ?>
                        <?php } ?>
                    <?php } ?>
                <?php } ?>
        </td>
        <?php if($i % 2 == 0) {?>
            </tr><tr>
        <?php } ?>
        <?php $i++; } ?>
    </tr>

</table>
